package hy.config;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RoundRobinRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ConfigBean {
//    @Bean
//    @LoadBalanced
//    public RestTemplate getRestTmp(){
//        return new RestTemplate();
//    }
    @Bean
    public IRule rule(){
        return new RoundRobinRule();
        //return new RandomRule();
        //return new RetryRule();
        //return new BestAvailableRule();
        //return new ReThreeRule();
    }
}
